package com.yuda.campsite.mapper;


import com.yuda.campsite.domain.OperProvince;
import com.yuda.campsite.dto.City;
import com.yuda.campsite.dto.School;
import org.apache.ibatis.annotations.Select;

import java.util.HashSet;
import java.util.List;

public interface OperSiteMapper {

    @Select("select name as provinceName,id as provinceId from campsite_province")
    HashSet<OperProvince> selectProvinceName();

    @Select("select id as cityId,`name` from campsite_city where parent_id = #{provinceId}")
    List<City> listCity(Long provinceId);

    @Select("select id as schoolId,`name` from campsite_school where city_id = #{cityId}")
    List<School> listSchool(Long cityId);
}

